1. Field of the Invention
The present invention relates generally to computer video image processing, and more particularly to compression and decompression of video images.
2. Description of the Prior Art
Compression of video image data in a computing environment offers several important benefits, including reduction of storage and transmission bandwidth requirements. Numerous techniques are known in the art for compressing and decompressing video image data. One commonly employed compression/decompression technique is embodied in the ISO1172 (xe2x80x9cMPEGxe2x80x9d) standard, which utilizes discrete cosine transforms to achieve compression of pixel luminance and chrominance data.
One disadvantage of MPEG and other prior art video compression/decompression techniques is that they are computationally expensive. Applications implementing prior art video compression/decompression methods in a real-time mode will typically require all available processing cycles of the CPU to execute successfully, thereby preventing concurrent execution of other applications. Further, the high computational requirements of most prior art video compression/decompression techniques necessitate the use of relatively high processing power CPUs to achieve satisfactory performance.
In view of the foregoing, there is a need in the computing art for a video image compression/decompression technique having significantly reduced computational requirements.
The present invention is directed to a low computational cost apparatus and method for compressing and decompressing video image data. In the compression mode, a color space conversion engine converts video image data to YUV or similar format, wherein each pixel is characterized by a luminance value and two chrominance values. The pixel chrominance data is compressed by any one of a number of well-known low computational cost techniques such as color subsampling.
To compress the luminance data, a difference calculator first calculates, for each pixel, a difference between the actual luminance value and a predicted luminance. The predicted luminance is preferably determined by averaging the luminance values of adjacent pixels. The video image is then divided into an array of contiguous blocks. A block characterization module assigns a frequency characteristic to each block based on the magnitude of the differences within the block. The assigned frequency characteristic is indicative of whether the portion of the image lying within the block contains a number of discontinuous features such as sharp edges (a high frequency block), or whether the image portion within the block is primarily continuous or non-varying (a low frequency block).
A difference quantizer then assigns a quantized difference code to each pixel based on the difference of the pixel and the block frequency characteristic. Each block frequency characteristic (e.g., low frequency, medium frequency, or high frequency) has an associated set of quantized difference values, and each quantized difference value has a quantized difference code corresponding thereto. The difference quantizer is operative to match the pixel difference to the closest quantized difference value, and assign to the pixel the corresponding quantized difference code. In a preferred implementation of the invention, pixel differences are adjusted to compensate for quantization errors of adjacent pixels. The quantized difference codes are stored in a compressed luminance map, and the block frequency characteristics are stored in a block description map.
In the decompression mode, an inverse difference quantizer examines the block description and compressed luminance maps, and determines, for each pixel, a quantized difference value based on the quantized difference code and the block frequency characteristic. A luminance calculator is operative to calculate a recovered luminance from the quantized difference value and the pre-calculated luminances of adjacent pixels. The recovered luminance data is thereafter combined with the separately decompressed chrominance data to reconstruct the video image.
In accordance with the foregoing description, the present invention advantageously provides a video image compression/decompression apparatus and method having relatively low computational requirements, thereby freeing CPU cycles and allowing its execution in a multitasking environment.